﻿{% extends "layout.html" %}

{% block head %}
{% endblock %}

{% block body %}

{% if job.CanBeEdited %}
{% else %}
	<h2 style="color: red; font-weight: bold;">The job is currently running and can't be edited!</h2>
{% endif %}

<form action="" enctype="multipart/form-data" method="post" id="resume_table">
	<table class="border" border="0" cellpadding="3" cellspacing="1">
		<tbody>
			{% include "job_common.html" %}

			{% if job.CanBeEdited %}
				<tr>
					<td colspan="2" style="text-align: center;">
						<br/>
						<br/>
						<input id="post" value="Resume" type="submit">
					</td>
				</tr>
			{% endif %}
		</tbody>
	</table>
</form>

{# Is not there an easier way than this? #}
<script type='text/javascript'>
	document.getElementById ( "categories" ).value = "{{ job.type }}";
	document.getElementById ( "quality" ).value = "{{ job.quality }}";
	document.getElementById ( "codec" ).value = "{{ job.codec }}";
	document.getElementById ( "container" ).value = "{{ job.container }}";
	document.getElementById ( "resolution" ).value = "{{ job.resolution }}";
	document.getElementById ( "source" ).value = "{{ job.source }}";
</script>

{% endblock %}